#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <functional>
#include <iostream>
#include <istream>
#include <vector>
using ll = int64_t;
#define sl static inline

const ll maxn = 2e5+5;
ll k,m,n,f[maxn],l[maxn],r[maxn];
struct C{
    ll p,t;
    inline bool operator<(const C& o)const{
        return p<o.p;
    }
}c[maxn];
std::vector<ll> v;

int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::cin>>k>>m>>n;
    for(ll i=1;i<=k;i++){
        std::cin>>c[i].p>>c[i].t;
    }
    for(ll i=1;i<=m;i++){
        std::cin>>f[i];
    }
    std::sort(c+1,c+1+k);
    std::sort(f+1,f+1+m);
    v.push_back(0);
    ll s;
    for(s=1;s<=k && c[s].p<f[1];s++){
        v.front()+=c[s].t;
    }
    // printf("fans=%lld\n",v.front());
    while(c[s].p==f[1])s++;
    // printf("start=%lld\n",s);
    for(ll i=1;i<m;i++){
        ll one=0,two=0;
        for(;s<=k && c[s].p<f[i+1];s++){
            if(c[s].p-f[i] < f[i+1]-c[s].p){
                l[i]+=c[s].t;
            }else{
                r[i]+=c[s].t;
            }
            two+=c[s].t;
        }
        one=std::max(l[i],r[i]);
        v.push_back(one);
        v.push_back(two-one);
        while(c[s].p==f[i+1])s++;
        // printf("from=%lld, to=%lld, one=%lld, two=%lld\n",f[i],f[i+1],one,two);
    }
    while(c[s].p==f[m])s++;
    v.push_back(0);
    for(;s<=k;s++){
        v.back()+=c[s].t;
    }
    // printf("end grass=%lld\n",v.back());
    std::sort(v.begin(),v.end(),std::greater<>());
    ll ans=0;
    for(ll i=0;i<v.size() && i<n;i++){
        ans+=v[i];
    }
    std::cout<<ans<<"\n";
}